//
//  AppDelegate+EntityRegister.m
//  RSW.IOS
//
//  Created by zhaiqiuqiu on 2018/1/23.
//  Copyright © 2018年 com.xtion.crm. All rights reserved.
//

#import "AppDelegate+EntityRegister.h"

@implementation AppDelegate (EntityRegister)

- (void)initFieldRelation
{
    {
        //个人信息
        XMSQueueDictionary *qd = [[XMSQueueDictionary alloc] initWithStoreClass:[CDBColPropertyPair class]];
        [qd addKey:@"usernumber" value:@"userNumber"];
        [qd addKey:@"loginname" value:@"loginName"];
        [qd addKey:@"name" value:@"userName"];
        [qd addKey:@"photo" value:@"logoURL"];
        
        [qd addKey:@"qq" value:@"qq"];
        [qd addKey:@"telno" value:@"tel"];
        [qd addKey:@"email" value:@"email"];
        [qd addKey:@"mobile" value:@"mobilePhone"];
        
        [qd addKey:@"deptid" value:@"departmentId"];
        [qd addKey:@"deptname" value:@"departmentName"];
        
        [qd addKey:@"positionjob" value:@"positionJob"];
        
        [XMSSQLiteDBTable registerDBTable:@"myinfo" Cls:[MyInfo class] DBColPropertyPair:qd];
        
        qd = [[XMSQueueDictionary alloc]initWithStoreClass:[CDBColPropertyPair class]];
        [qd addKey:@"UserID" value:@"userNumber"];
        [qd addKey:@"LoginName" value:@"loginName"];
        [qd addKey:@"Name" value:@"userName"];
        [qd addKey:@"Photo" value:@"logoURL"];
        
        [qd addKey:@"QQ" value:@"qq"];
        [qd addKey:@"TelNo" value:@"tel"];
        [qd addKey:@"Email" value:@"email"];
        [qd addKey:@"Mobile" value:@"mobilePhone"];
        
        [qd addKey:@"DeptID" value:@"departmentId"];
        [qd addKey:@"DeptName" value:@"departmentName"];
        
        [qd addKey:@"Job" value:@"positionJob"];
        
        [CTransformHTTPRESTObj registerTransformObjKey:@"myinfo" Cls:[MyInfo class] transformPropertyPair:qd];
    }
    {
        //企业通信录
        XMSQueueDictionary *qd = [[XMSQueueDictionary alloc] initWithStoreClass:[CDBColPropertyPair class]];
        [qd addKey:@"usernumber" value:@"userNumber"];
        [qd addKey:@"loginname" value:@"loginName"];
        [qd addKey:@"name" value:@"userName"];
        [qd addKey:@"photo" value:@"logoURL"];
        
        [qd addKey:@"qq" value:@"qq"];
        [qd addKey:@"telno" value:@"tel"];
        [qd addKey:@"email" value:@"email"];
        [qd addKey:@"mobile" value:@"mobilePhone"];
        
        [qd addKey:@"deptid" value:@"departmentId"];
        [qd addKey:@"deptname" value:@"departmentName"];
        
        [qd addKey:@"deptgroupid" value:@"deptGroupId"];
        [qd addKey:@"deptgroupname" value:@"deptGroupName"];
        
        [qd addKey:@"positionjob" value:@"positionJob"];
        
        [XMSSQLiteDBTable registerDBTable:@"entaddressbookcontact" Cls:[EntAddressBookContact class] DBColPropertyPair:qd];
        
        qd = [[XMSQueueDictionary alloc]initWithStoreClass:[CDBColPropertyPair class]];
        [qd addKey:@"UserID" value:@"userNumber"];
        [qd addKey:@"LoginName" value:@"loginName"];
        [qd addKey:@"Name" value:@"userName"];
        [qd addKey:@"Photo" value:@"logoURL"];
        
        [qd addKey:@"QQ" value:@"qq"];
        [qd addKey:@"TelNo" value:@"tel"];
        [qd addKey:@"Email" value:@"email"];
        [qd addKey:@"Mobile" value:@"mobilePhone"];
        
        [qd addKey:@"DeptID" value:@"departmentId"];
        [qd addKey:@"DeptName" value:@"departmentName"];
        
        [qd addKey:@"DeptGroupID" value:@"deptGroupId"];
        [qd addKey:@"DeptGroupName" value:@"deptGroupName"];
        
        [qd addKey:@"Job" value:@"positionJob"];
        
        [CTransformHTTPRESTObj registerTransformObjKey:@"entaddressbookcontact" Cls:[EntAddressBookContact class] transformPropertyPair:qd];
    }
    {
        //字典表
        XMSQueueDictionary *qd = [[XMSQueueDictionary alloc]initWithStoreClass:[CDBColPropertyPair class]];
        [qd addKey:@"dicid" value:@"dicId"];
        [qd addKey:@"bindflag" value:@"bindFlag"];
        [qd addKey:@"name" value:@"name"];
        [qd addKey:@"code" value:@"code"];
        [qd addKey:@"orderindex" value:@"orderIndex"];
        [qd addKey:@"upid" value:@"upId"];
        [XMSSQLiteDBTable registerDBTable:@"dicinfo" Cls:[DicInfo class] DBColPropertyPair:qd];
        
        qd = [[XMSQueueDictionary alloc]initWithStoreClass:[CDBColPropertyPair class]];
        [qd addKey:@"ID" value:@"dicId"];
        [qd addKey:@"bangdingbiaozhi" value:@"bindFlag"];
        [qd addKey:@"name" value:@"name"];
        [qd addKey:@"bianma" value:@"code"];
        [qd addKey:@"orderindex" value:@"orderIndex"];
        [qd addKey:@"upid" value:@"upId"];
        [CTransformHTTPRESTObj registerTransformObjKey:@"dicinfo" Cls:[DicInfo class] transformPropertyPair:qd];
    }
    {
        //菜单
        XMSQueueDictionary *qd = [[XMSQueueDictionary alloc]initWithStoreClass:[CDBColPropertyPair class]];
        [qd addKey:@"menuid" value:@"menuId"];
        [qd addKey:@"pid" value:@"pId"];
        [qd addKey:@"code" value:@"code"];
        [qd addKey:@"name" value:@"name"];
        [qd addKey:@"icon" value:@"icon"];
        [qd addKey:@"mapdate" value:@"mapDate"];
        [qd addKey:@"remark" value:@"remark"];
        [qd addKey:@"createdate" value:@"createDate"];
        [qd addKey:@"isroot" value:@"isRoot"];
        [qd addKey:@"ispoint" value:@"isPoint"];
        [qd addKey:@"isnew" value:@"isNew"];
        [qd addKey:@"isgrid" value:@"isGrid"];
        [qd addKey:@"mobiletype" value:@"mobileType"];
        [qd addKey:@"mobileparam" value:@"mobileParameters"];
        [qd addKey:@"classname" value:@"className"];
        [qd addKey:@"orderby" value:@"orderBy"];
        [XMSSQLiteDBTable registerDBTable:@"menuinfo" Cls:[MenuInfo class] DBColPropertyPair:qd];
        
        qd = [[XMSQueueDictionary alloc]initWithStoreClass:[CDBColPropertyPair class]];
        [qd addKey:@"ID" value:@"menuId"];
        [qd addKey:@"ParentID" value:@"pId"];
        [qd addKey:@"Code" value:@"code"];
        [qd addKey:@"Name" value:@"name"];
        [qd addKey:@"Icon" value:@"icon"];
        [qd addKey:@"Mapdate" value:@"mapDate"];
        [qd addKey:@"Remark" value:@"remark"];
        [qd addKey:@"CreateDate" value:@"createDate"];
        [qd addKey:@"IsRoot" value:@"isRoot"];
        [qd addKey:@"IsPoint" value:@"isPoint"];
        [qd addKey:@"IsNew" value:@"isNew"];
        [qd addKey:@"IsGrid" value:@"isGrid"];
        [qd addKey:@"MobileType" value:@"mobileType"];
        [qd addKey:@"MobileParameters" value:@"mobileParameters"];
        [qd addKey:@"ClassName" value:@"className"];
        [qd addKey:@"OrderBy" value:@"orderBy"];
        [CTransformHTTPRESTObj registerTransformObjKey:@"menuinfo" Cls:[MenuInfo class] transformPropertyPair:qd];
    }
}

- (void)initCustomerFieldRelation
{
    
}
@end
